<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            height: 1800px;
            background-color: #ccc;
        }
    </style>
</head>
<body>
    <a href="#lo1">去位置1</a>
    <a href="#lo2">去位置2</a>
    <div class="box"></div>
    <h2 id="lo1">位置1</h2>
    <div class="box"></div>A
    <h2 id="lo2">位置2</h2>
</body>
</html>